![]() |
QD51 - 8 ÉrÉbÉgÇÊÇËëÂÇ´Ç¢ÉOÉåÉCÉXÉPÅ[ÉãâÊëúÇÃçÏê¨(97 îN 11 åé 17 ì˙)Q: 8 ÉrÉbÉgÇÊÇËëÂÇ´Ç¢âëúìxÇÃÉOÉåÉCÉXÉPÅ[ÉãâÊëúÇçÏê¨ÇµÇƒÅAMac Ç≈ï\é¶ÇµÇΩÇ¢ÇΔévǢNjÇ∑ÅBç≈ó«ÇÃï˚ñ@Çã≥ǶǃÇ≠ÇæÇ≥Ç¢ÅB
A:
Quickdraw Ç…ÇÕå≥óàÉOÉåÉCÉXÉPÅ[Éã UInt16 *sourceGreyPtr; UInt32 *destPixelsPtr; UInt16 pixel1, pixel2, pixel3, pixel4; UInt32 pixelOutput; { pixel1 = sourceGreyPtr[0]; pixel2 = sourceGreyPtr[1]; pixel3 = sourceGreyPtr[2]; pixel4 = sourceGreyPtr[3]; // äeÉsÉNÉZÉãÇäYìñà íuÇ‹Ç≈ÉVÉtÉgǵǃÅAï‚êîÇéÊÇËÅAäYìñÉoÉCÉgÇÉ}ÉXÉNÇ∑ÇÈ pixel1 = ~(pixel1 << 16) & 0xFF000000; pixel2 = ~(pixel2 << 8) & 0x00FF0000; pixel3 = ~(pixel3) & 0x0000FF00; pixel4 = ~(pixel4 >8) & 0x000000FF; pixelOutput = (pixel1 << 24) | (pixel2 << 16) | (pixel3 << 8) | (pixel4); *destPixelsPtr = pixelOutput; sourceGreyPtr +=4; // 8 ÉoÉCÉgêiÇflÇÈ destPixelsPtr +=1; // 4 ÉoÉCÉgêiÇflÇÈ }Quickdraw GX Ç…ÇÕÅAãPìxÉxÅ[ÉXÇÃÉJÉâÅ[ÉÇÉfÉã ( gxGraySpace ) Ç™ä‹Ç‹ÇÍǃǢNjÇ∑ÅB
-- Tim Carroll [ Technical Q&A's : Graphics & Media : QuickDraw : QD51 ] |
![]() |